﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using yiCommerce.Core;
using yiCommerce.Mapper;
using yiCommerce.Models.FriendShips;
using yiCommerce.Service.FriendShips;

namespace yiCommerce.Controllers
{
    public class FriendShipController : Controller
    {

        private IFriendShipService _friendShipService;
        private IWorkContext _workContext;


        public ActionResult Index()
        {
            return RedirectToAction("List");
        }

        public ActionResult List()
        {
            var myfriends = _friendShipService.Follows(_workContext.CurrentCustomer.Id);
            var model = new FriendShipListModel()
                {
                    Friends = FriendShipMapper.PrepareFriendShipListItemModel(myfriends)
                };

            ViewBag.Model = model;
            return View();
        }

        public ActionResult Create()
        {
            return View();
        }
    }
}
